package com.zpark.spring_01.test;

import com.zpark.spring_01.factory.BeanFactory;
import com.zpark.spring_01.service.IAccountService;
import com.zpark.spring_01.service.impl.AccountServiceImpl;
import org.junit.Test;

/**
 * @PackageName: com.zpark.spring_01.test
 * @ClassName: Client
 * @Description:
 * @author: RZS
 * @date: 2023/3/23  9:41
 */
public class Client {

    private IAccountService accountService = (IAccountService) BeanFactory.getBean("accountService");

    @Test
    public void test1(){
        accountService.save();
    }

    @Test
    public void test2(){
        IAccountService a1 = (IAccountService) BeanFactory.getBean("accountService");
        IAccountService a2 = (IAccountService) BeanFactory.getBean("accountService");
        IAccountService a3 = (IAccountService) BeanFactory.getBean("accountService");

        System.out.println(a1);
        System.out.println(a2);
        System.out.println(a3);
    }
}
